package com.bingkaimedia.merchantbeta.libs_tab;


import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.bingkaimedia.merchantbeta.app.List_Data_Pernah;
import com.bingkaimedia.merchantbeta.app.List_Data_Populer;
import com.bingkaimedia.merchantbeta.app.List_Data_Semua;

public class TabsPagerAdapter extends FragmentPagerAdapter {

	private final String[] TITLES = { "All", "Popular", "Recent"};

	 

	@Override
	public CharSequence getPageTitle(int position) {
		return TITLES[position];
	}

	@Override
	public int getCount() {
		return TITLES.length;
	}
/*
	@Override
	public Fragment getItem(int position) {
		viewPager.setCurrentItem(position);
		//return SuperAwesomeCardFragment.newInstance(position);
		return null;
	}
	*/
	public TabsPagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int index) {

		switch (index) {
		case 0:
			// Top Rated fragment activity
			//return List_Data_Semua.newInstance(0, "Page # 1");
			return new List_Data_Semua();
		case 1:
			// Games fragment activity
			return new List_Data_Populer();
		case 2:
			// Movies fragment activity
			return new List_Data_Pernah(); 
	 
		}

		return null;
	}

	/*
	@Override
	public int getCount() {
		// get item count - equal to number of tabs
		return 8;
	}
	*/

}
